package com.zz.yt.lib.bluetooth.delegate.pad;

import android.content.Context;
import android.zyapi.pos.PosManager;

import com.blankj.utilcode.util.DeviceUtils;
import com.whf.android.jar.app.Latte;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * 是否是PDA
 */
public final class PdaUtils {

    /**
     * 是否是PDA
     */
    private static final String PDA = "PDA";

    private static final List<String> PDA_MODEL = new ArrayList<>(Arrays.asList("Hand-held Terminal", "android", "SUPOIN"));


    public static void init(Context context) {
        if (pdaModel()) {
            PosManager.get().init(context, PDA);
        }
    }

    /**
     * 判断型号；0手机 ；1 HandPda；2联迪Pda；
     */
    public static boolean pdaModel() {
        if (Latte.getDebug()) {
            return true;
        }
        final String manufacturer = DeviceUtils.getManufacturer();
        return PDA_MODEL.contains(manufacturer);
    }


}
